Logic of relatives